unit UnPrincipal;

interface

uses
  Windows, Classes, Controls, Forms, StdCtrls, ComCtrls, JvComCtrls,
  JvValidateEdit, UnThreadVareIPs, JvExStdCtrls, JvEdit, JvExControls,
  JvComponentBase, JvComputerInfoEx;

type
  TForm1 = class(TForm)
    Button: TButton;
    Memo: TMemo;
    Barra: TStatusBar;
    IPInicio: TJvIPAddress;
    IPFim: TJvIPAddress;
    Port: TJvValidateEdit;
    TimeOut: TJvValidateEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    BtParar: TButton;
    procedure ButtonClick(Sender: TObject);
    procedure BtPararClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    T: TThreadVareIPs;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation


{$R *.dfm}

procedure TForm1.ButtonClick(Sender: TObject);
begin
T := TThreadVareIPs.Create(False);
end;

procedure TForm1.BtPararClick(Sender: TObject);
begin
T.Suspend;
T.Terminate;
//T.Free;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
//T := TVareIPs.Create(True);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
//T.Free;
end;

end.
